NOTE: The only way found to get a single continuous and complete document exported is to download the dokuwiki to a local computer and to run the plugin completely locally, due to an excessive number of failures which require “exclusion” of the last page.
PHP Configuration: plugin siteexport cachetime | 60*60*24 |
The SiteExport Plugin is used to export the User Manual (compressed siteexport.zip with multiple page html & images). The Opencpn_User_Manual TOC page:
See opencpn:opencpn_user_manal:toc
is used to provide a “hyperlinked page-by-page” Table of Contents which is required to export the User Manual.
There is more information about configuration of the IndexMenu Plugin & TOC here, but the syntax and code we need in the TOC page to create the Flat open TOC is:
CODE: {{indexmenu>:opencpn:opencpn_user_manual#5|msort nsort nojs}}
See opencpn:opencpn_user_manal:toc for the result.
To see this code, navigate to the TOC page above and use DWedit (right hand menu second button from the bottom to expose the code, you need edit rights).
The settings used were: From the Offline TOC page OR Opencpn User Manual page
Except levels and Exclusion.
These are the settings which should be used in the Admin > Config down to SiteExport
| Parameter Description | Value |
|---|---|
| plugin export allowallusers | Checked |
| plugin siteexport default depth | 7 |
| plugin siteexport zipfilename | opencpn:siteexport.zip |
| plugin siteexport exclude | pdf zip 7z edit_user_manual blank cruisersforum gallery_boats place_view github |
| plugin siteexport max_execution_time | 2400 |
| plugin siteexport ignoreNon200 | checked |
| plugin siteexport ignoreAJAXError | checked |
| plugin siteexport debugLevel | Error |
| plugin siteexport debugFile | debug3.txt |
| plugin siteexport cachetime | 60*60*24 |
| plugin siteexport PDFHeaderPagebreak | 1 |
| plugin siteexport seOddEven | not checked |
| plugin siteexport defaultAuthenticationUser | admin |
| plugin siteexport defaultAuthenticationPassword | blank |
| plugin siteexport useProxy | blank |
| plugin siteexport offSiteLinkTemplate |
plugin»siteexport»allowallusers Allow all users to export pages
plugin»siteexport»depth Default Export Depth
plugin»siteexport»skipacl Try to export non-public pages
plugin»siteexport»zipfilename Wiki Path and name for exported ZIP file
plugin»siteexport»exclude Pattern to exclude resources
plugin»siteexport»max_execution_time Maximum script execution time
plugin»siteexport»ignoreNon200 Ignore non-200 status during export
plugin»siteexport»ignoreAJAXError Do not interrupt export with errors
plugin»siteexport»debugLevel Debug Level
plugin»siteexport»debugFile Debug File
plugin»siteexport»cachetime Cache time for export
plugin»siteexport»PDFHeaderPagebreak plugin siteexport PDFHeaderPagebreak
plugin»siteexport»useOddEven Allows setting of different headers and footer on odd/even pages. TOCs will always start on odd pages.
plugin»siteexport»defaultAuthenticationUser Username for non-public pages
plugin»siteexport»defaultAuthenticationPassword Password for non-public pages
plugin»siteexport»useProxy plugin siteexport useProxy
plugin»siteexport»offSiteLinkTemplate plugin siteexport offSiteLinkTemplate
To Export OpenCPN User Manual TOC we want a non-expandable flat TOC with every page shown in proper order.
{{indexmenu>:opencpn:opencpn_user_manual#5|msort nsort nojs}}
Top Button - https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn&addParams=1&defaultLang=en&depth=4&depthType=0.0&do=siteexport&ens=opencpn&exportLinkedPages=1&renderer=&template=bootstrap3
Middle Button - wget --max-redirect=4 --output-document=siteexport.zip --post-data="id=opencpn&addParams=1&defaultLang=en&depth=4&depthType=0.0&do=siteexport&ens=opencpn&exportLinkedPages=1&renderer=&template=bootstrap3" https://opencpn.org/wiki/dokuwiki/doku.php?id=doku.php --http-user=USER --http-passwd=PASSWD
Bottom Button - curl -L --max-redirs 4 -o siteexport.zip -d "id=opencpn&addParams=1&defaultLang=en&depth=4&depthType=0.0&do=siteexport&ens=opencpn&exportLinkedPages=1&renderer=&template=bootstrap3" https://opencpn.org/wiki/dokuwiki/doku.php?id=doku.php --anyauth --user USER:PASSWD
Debugging must be activated from ADMIN > CONFIG and Browser file>“find” “siteexp” go down and change these parameters:
plugin»siteexport»debugFile
Debug File debug3.txt
plugin»siteexport»zipfilename
Wiki Path and name for exported ZIP file opencpn:siteexport.zip
plugin»siteexport»exclude
Pattern to exclude resources .gov|favicon|advanced_chart_work|gshhshires
Then click on the Home button, from the dropdown button pick Media Manager
https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn&do=media&ns=
and look under the directories for root then look for the debug.txt file or in our case debug3.txt. You can click on it to get it into the window, then click on the file name to download it. View it with something like NotePad++. The last error will be at the end.
Each time SiteExport is used it leaves a file here, browse to root:opencpn directory. Use Media Manager to see
https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn&do=media&ns=debug3.txt